<template>
    <div>
        <van-submit-bar placeholder :price="cardListStore.totalPrice" button-text="提交订单" @submit="onSubmit">
            <van-checkbox v-model="cardListStore.checked" @click="checkedAll">全选</van-checkbox>
        </van-submit-bar>
    </div>
</template>
<script lang='ts' setup>
import { useCardListStore } from '@/stores/cardStore';
import { changeFlagAll } from '@/service/api'
const cardListStore = useCardListStore();
function checkedAll() {
    cardListStore.cardList.forEach(item => {
        item.flag = cardListStore.checked
    });
    changeFlagAll(cardListStore.checked);
}



function onSubmit() {

}
</script>
<style lang='less' scoped>
:deep(.van-submit-bar) {
    bottom: 50px;
}
</style>